//api文件仍保留但不建议使用，推荐使用models中的api。API files remain preserved (deprecated), use models APIs instead.
import type { MinishopConfig, MinishopConfigResponse } from './types.js';

import { requestClient } from '#/api/request';

export const getuctooMinishopConfigList = async (page: number, pageSize: number,
  searchParams?: any) => {
  return requestClient.get<MinishopConfigResponse>(`/uctoo/minishop_config/${pageSize}/${page}`,{
    params: searchParams,
  });
};

export const getuctooMinishopConfig = async (id: string) => {
  return requestClient.get<MinishopConfig>(`/uctoo/minishop_config/${id}`);
};

export const adductooMinishopConfig = async (data: Partial<MinishopConfig>) => {
  return requestClient.post<MinishopConfig>('/uctoo/minishop_config/add', data);
};

export const edituctooMinishopConfig = async (data: Partial<MinishopConfig>) => {
  return requestClient.post<MinishopConfig>('/uctoo/minishop_config/edit', data);
};

export const deleteuctooMinishopConfig = async (id: string) => {
  return requestClient.post<any>('/uctoo/minishop_config/del', { id });
};
